<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Axious异步通信</title>
</head>

<body>
    <div id="vue">
        <div>{{info.name}}</div>
        <div>{{info.address.street}}</div>
        <a v-bind:href="info.url">点击</a>
        <div>{{info.links[0].name}}</div>
        <a v-bind:href="info.links[0].url">点击</a>
    </div>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var vm = new Vue({
            el: "#vue",
            data() {
                return {
                    info: {
                        name: null,
                        address: {
                            street: null,
                            country: null
                        },
                        url: null,
                        links: [
                            "name",
                            "url"
                        ]
                    }
                }
            },
            mounted() {
                axios.get('data.json').then(response => (this.info = response.data));
            }
        });
    </script>
</body>

</html>